/**
 * Created by Toma on 2016/12/9.
 * 接口, 引用提示
 * github DefinitelyTyped/tsd 
 */

interface IPerson{
    name: string;
    age: number;
}

class Person{
    constructor(public config:IPerson){

    }
}

var p1 = new Person({
    name: '张三',
    age: 18
})

/*---------------------------------------------------------*/


// 声明和实现
interface Animal{
    eat();
}

class Sheep implements Animal{
    eat(){
        console.log('i eat grass');
        $('.oi').addClass('df12');
        $('.bix').nextAll();
    }
}